﻿namespace MicroCloud.Packs
{
    /// <summary>
    /// 模块依赖
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
    public class DependsOnPacksAttribute : Attribute
    {
        /// <summary>
        /// 初始化一个模块依赖 <see cref="DependsOnPacksAttribute"/> 的新实例
        /// </summary>
        /// <param name="dependedPackTypes">当前模块的依赖模块类型集合</param>
        public DependsOnPacksAttribute(params Type[] dependedPackTypes)
        {
            DependedPackTypes = dependedPackTypes;
        }

        /// <summary>
        /// 获取 当前模块的依赖模块类型集合
        /// </summary>
        public Type[] DependedPackTypes { get; }

    }
}
